#pragma once
#include "..\dxstdafx.h"
#include "..\base\Service.h"

namespace ds {

class CTimer : public Service {

public:	
	CTimer();
	~CTimer();
	void initialize() {};
	void dispose(){};
	void update(float elapsed);	
	DWORD getRealCount();
	float getFPS();
	double getAverageFPS();

private:
	DWORD startTime;
	LONGLONG lastTick;
	LONGLONG freq;
	float mFPS;
	double tmpFPS;
	double averageFPS;
	double averageFPSStartTime;
	int averageFPSCounter;
	float secsPerCnt;
};

};